<?php
//=========================
//Vuong Van Binh
//Wanbin@vietnambiz.com
//list & del user
//=========================
include ADMIN_INCLUDE_DIR."/header.php";
del_user();
del_multi_user();
?>
<div class="container_l">
		<div class="title_user"><img src="images/icon1.gif" />Danh sách người quản trị </div>
		<div class="table_user">
			<form name="del_check" action="" method="post" id="form_del_check">
			<div class="table_user_in">
				<div class="boxtitle">
					<div class="d_input" style="width:3%;"><input type="checkbox" name="checkall" id="checkall" value="" /></div>
					<div class="d_user" style="width:43%;">Tên đăng nhập</div>
					<div class="d_email" style="width:20%;">Email</div>
					<div class="d_user" style="width:20%;">Lần login cuối</div>
					<div class="d_setting" style="width:13%;">Hành động</div>
				</div>
				
				<?php
				      $rs = get_all_user();
					  
					  if($db->num_rows($rs) > 0){
					  
						while($user=$db->fetch_array($rs)){
						
				?>
				
						<div class="lineuser">
							<div class="d_input2" style="width:3%;"><input type="checkbox" name="check[]" id="check" class="check" value="<?php echo $user["id"]; ?>" /></div>
							<div class="d_user2" style="width:43%;text-align:left"><font class="textbody">
							
							<?php if($user["active"]=="yes"){ echo "&nbsp;&nbsp;".$user["username"]; }else{echo "<font color='red'>".$user["username"]."</font>";}?>
							
							</font></div>
							<div class="d_email2" style="width:20%;text-align:left"><font class="textbody"><?php echo $user["email"]; ?></font></div>
							<div class="d_type" style="width:20%; text-align:left"><font class="textbody"><?php echo get_my_date($user["last_login"]); ?></font></div>
							<div class="d_setting2" style="width:13%;">
							<a href="index.php?module=user&action=edit&id=<?php echo $user["id"]; ?>"><img src="images/edit.gif" alt="Edit profile" title="Edit profile" /></a>
							<a onclick="confirm_get('Are you sure to delete : <b><?php echo replace_quot($user[$i]["username"]); ?></b> ?','index.php?module=user&del=<?php echo $user["id"]; ?>');" href="javascript:void(0);"><img src="images/delete.gif" alt="Delete" title="Delete" /></a></div>
						</div>
				
				<?php
				      }  }else{ echo "<font color=red> No User...</font>";}
				?>
				
				<div class="boxbutton">
				    <input type="hidden" name="del_multi" value="okie" />
 					<input type="button" value="Xóa những người quản trị đã được chọn" class="button" onclick="confirm_post('Bạn có muốn xóa những người quản trị đã được chọn?','form_del_check');" />
				</div>
				</form>			
			</div>
			
		</div>
		
</div>
<?php
include "inc/right.php"; 
include ADMIN_INCLUDE_DIR."/footer.php"; 
?>